
{{if !$order_id}}

	<div class="clearfix ui-portlet-header" style="margin:5px 0;">收件人地址   <a class="btn btn-primary btn-xs" style="padding:0 20px;" href="{{$this->Html->url('/orders/edit_consignee')}}" onclick="return publishController.open_dialog(this.href,{title:'{{__('Add Consignee')}}',hidden:'remove',width:750});"><i class="glyphicon glyphicon-plus"></i> 填写</a></div>
    <div id="part_consignee" class="row clearfix" style="min-height: 80px;">
<?php $key=0;if($is_mobile) {$show_nums = 0;} else{$show_nums = 3;} ?>
{{loop $consignees $key $consignee}}
	<div class="col-md-3 {{if $key > $show_nums}}hidden{{/if}} consignee-item">	
		<label for="oc-rd-{{$consignee['UserAddress']['id']}}" style="display:block;font-weight: normal;">
		<div class="consignee-box {{if $key == 0}}active{{/if}}" id="consignee-{{$consignee['UserAddress']['id']}}" data-id="{{$consignee['UserAddress']['id']}}">
		
			<p>
				<strong>{{$consignee['UserAddress']['name']}}</strong> &nbsp;
			 	<small><a href="{{$this->Html->url('/orders/edit_consignee/'.$consignee['UserAddress']['id'])}}" onclick="return publishController.open_dialog(this.href,{title:'{{__('Edit Consignee')}}',hidden:'remove',width:750});">[{{__('Edit')}}]</a></small>
			 	<small><a href="javascript:" onclick="DelAddress({{$consignee['UserAddress']['id']}})">[{{__('Delete')}}]</a></small>
			 	
			 </p>
			 <small>
			 <p>{{$consignee['UserAddress']['province']}} &nbsp; {{$consignee['UserAddress']['city']}} &nbsp; {{$consignee['UserAddress']['area']}}</p>
			<section class="address" style="min-height:60px"><p>{{$consignee['UserAddress']['address']}}</p></section>
			<p>{{$consignee['UserAddress']['mobilephone']}}</p>
			</small>
			<div class="inok"><img src="{{$this->Html->url('/img/common/arrow-red.png')}}" alt=""></div>
			
			<input type="radio" class="consignee-radio" {{if $key == 0}}checked="checked"{{/if}} id="oc-rd-{{$consignee['UserAddress']['id']}}" name="data[Order][consignee_id]" value="{{$consignee['UserAddress']['id']}}">
		</div>
		</label>
	</div>
{{/loop}}
	</div>
	{{if $key > $show_nums}}
		<div class="col-md-12" style="height:24px;margin: 10px 0;text-align:center;"><a  id="show-more-address"  href="javascript:void(0)"><i class="fa fa-chevron-down"></i>更多地址</a></div>
	{{/if}}

	<!-- 
	<div class="col-md-3">	
		<div class="consignee-item-add" data-id="{{$consignee['UserAddress']['id']}}">
			<a href="{{$this->Html->url('/orders/edit_consignee')}}" onclick="return publishController.open_dialog(this.href,{title:'{{__('Add Consignee')}}',width:550});"><i class="glyphicon glyphicon-plus"></i></a>
		</div>
	</div>
	 -->
{{else}}
	<div class="col-md-12">
		<hr>
		<h4>收件人信息</h4>
		<p><span>联系人</span>: {{$orderinfo['Order']['consignee_name']}}</p>
		<p><span>联系电话</span>: {{if $orderinfo['Order']['consignee_mobilephone'] }}{{$orderinfo['Order']['consignee_mobilephone']}} &nbsp; &nbsp; {{/if}}{{$orderinfo['Order']['consignee_telephone']}}</p>

		<p><span>地址</span>: {{$orderinfo['Order']['consignee_province']}}{{$orderinfo['Order']['consignee_city']}}{{$orderinfo['Order']['consignee_area']}} {{$orderinfo['Order']['consignee_address']}}</p>
	</div>
{{/if}}
